package org.jeecg.modules.demo.weixin.smtdouyintuangou.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.weixin.entity.SmtDouyinTuangou;
import org.jeecg.modules.demo.weixin.smtdouyintuangou.mapper.SmtDouyinTuangouMapper;
import org.jeecg.modules.demo.weixin.smtdouyintuangou.service.ISmtDouyinTuangouService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description: smt_douyin_tuangou
 * @Author: jeecg-boot
 * @Date: 2023-11-03
 * @Version: V1.0
 */
@Service
public class SmtDouyinTuangouServiceImpl extends ServiceImpl<SmtDouyinTuangouMapper, SmtDouyinTuangou> implements ISmtDouyinTuangouService {
    @Resource
    private SmtDouyinTuangouMapper smtDouyinTuangouMapper;

    @Override
    public SmtDouyinTuangou queryDyTuangou(String productId) {
        LambdaQueryWrapper<SmtDouyinTuangou> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SmtDouyinTuangou::getPeoductId, productId);
        SmtDouyinTuangou smtDouyinTuangou = smtDouyinTuangouMapper.selectOne(queryWrapper);
        return smtDouyinTuangou;
    }
}
